#include "PrecompiledHeader.h"
#include "Timer.h"

/*--------------------------------------------------------------------------*/

Timer::Timer()
{

}

/*--------------------------------------------------------------------------*/

Timer::~Timer()
{

}

/*--------------------------------------------------------------------------*/

void Timer::SetTimer()
{
	QueryPerformanceFrequency(&this->m_freq);
	QueryPerformanceCounter(&this->m_sc);
}

/*--------------------------------------------------------------------------*/

float Timer::GetTimer()
{
	QueryPerformanceCounter(&this->m_c);

	return (float)((__int64) this->m_c.QuadPart - (__int64) this->m_sc.QuadPart) * 1000.0f / (float)(this->m_freq.QuadPart);
}

/*--------------------------------------------------------------------------*/